<template>
    <div class="layout">
      <el-container>
        <el-aside width="200px">
          <el-menu router>
            <SubMenu :children="store.state.permission.menus"></SubMenu>
          </el-menu>
        </el-aside>
        <el-container>
          <el-header>
            header
          </el-header>
          <el-main>
            <RouterView></RouterView>
          </el-main>
        </el-container>
      </el-container>
    </div>
  </template>
  <script setup>
  import SubMenu from '@/components/SubMenu.vue'
  import {useStore} from 'vuex';  
  // 获取store实例
  const store = useStore();
  // 获取菜单
 //store.dispatch("getMenu");
  </script>
  <style scoped>
  .layout{
    height: 100vh;
  }
  </style>
